package io;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.UnsupportedEncodingException;

public class WriteStringDemo01 {
    public static void main(String[] args) throws IOException {
        String str="获得巨大时间";
        FileOutputStream fos = new FileOutputStream("./f1.txt");
        byte[] data=str.getBytes("UTF-8");
        fos.write(data);
        str="Hello Tedu";
        fos.write(str.getBytes("UTF-8"));
        fos.close();
    }
}
